<?
include 'config.inc.php';
//接收发送者的用户名
$username  = @$_POST['username'];
$password  = @$_POST['password'];
$cion      = base64_decode(@$_POST['cion']);
$type      = @$_POST['type'];
include 'member.php';
if($talk == '1'){
   echo '充值'.$coin.'元以上的才可以发言。';
   exit;
}
if($type ==''){
   
}else{
  $admin =3;
}
//发送的内容
$send_value = $_POST['sendvalue'];
$sendvalue = str_replace(array("<div><br></div>", "<div>&nbsp;</div>", "\n"), "", $send_value);

//判断是否为正事用户
/*if($cion <'0.01'){
   echo '请充值后再说话';
   exit;
}*/
if($sendvalue == ''){
   echo '发送的内容不能为空';
   exit;
}
if($nickname == ''){
   echo '请在个人信息内设置昵称';
   exit;
}
$time = date("H:i:s");
$vip = $user_vip ;
//插入数据
mysql_query("INSERT INTO wwk_chat_msg (id,nickname , username, time, msg,img,type,vip) 
VALUES ('','$nickname' , '$username', '$time','$sendvalue','$img_src','$admin','$vip')");


echo '发送成功';

?>